#include <Keyboard.h>
#include <EEPROM.h>
#include <basic.h>

/*
 * [name]
 *   Press|Release
 *
 * [description]
 *   Generate a normal keypress or keyrelease
 */
void vimfun_esc(void) {
	Keyboard.press(KEY_ESC);
    Keyboard.releaseAll();
}

void vim_back(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('o');
    Keyboard.releaseAll();
}

void vim_front(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('i');
    Keyboard.releaseAll();
}

void vim_reference(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('s');
    Keyboard.releaseAll();
}

void vim_define(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('g');
    Keyboard.releaseAll();
}

void vim_calls(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('c');
    Keyboard.releaseAll();
}

void vim_egrep(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('e');
    Keyboard.releaseAll();
}

void vim_called(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('d');
    Keyboard.releaseAll();
}

void vim_file(void) {
	Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.press('\');
    Keyboard.press('d');
    Keyboard.releaseAll();
}

void kbfun_1(void) {
    Keyboard.press('1');
    Keyboard.releaseAll();
}

void kbfun_2(void) {
    Keyboard.press('2');
    Keyboard.releaseAll();
}

void kbfun_3(void) {
    Keyboard.press('3');
    Keyboard.releaseAll();
}

void kbfun_4(void) {
    Keyboard.press('4');
    Keyboard.releaseAll();
}

void kbfun_5(void) {
    Keyboard.press('5');
    Keyboard.releaseAll();
}

void kbfun_6(void) {
    Keyboard.press('6');
    Keyboard.releaseAll();
}

void kbfun_7(void) {
    Keyboard.press('7');
    Keyboard.releaseAll();
}

void kbfun_8(void) {
    Keyboard.press('8');
    Keyboard.releaseAll();
}

void kbfun_9(void) {
    Keyboard.press('9');
    Keyboard.releaseAll();
}

